package com.fy.fyspace.controller;

import com.fy.fyspace.common.annotation.GlobalInterceptor;
import com.fy.fyspace.common.result.Result;
import com.fy.fyspace.service.FavoritePictureService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 图片 前端控制器
 * </p>
 *
 * @author fwq
 * @since 2025-06-25
 */
@Slf4j
@Api(value = "收藏图片相关接口", tags = "收藏图片")
@RestController
@RequestMapping("/favoritepicture")
public class FavoritePictureController {

    @Resource
    private FavoritePictureService favoritePictureService;
    /**
     * 批量收藏图片
     * @param picIds
     * @return
     */
    @ApiOperation(value = "批量收藏图片", notes = "批量收藏图片")
    @GlobalInterceptor
    @PostMapping("/favorite/batch")
    public Result batchFavoritePictures(@RequestParam String picIds) {
        log.info("批量收藏图片/picIds:{}", picIds);
        return favoritePictureService.batchFavoritePictures(picIds);
    }
}
